1. Field of the Invention
The invention concerns physical pages in a computer system, i.e., blocks of volatile memory such as dynamic random access memory (“DRAM”), that are subject to access by input/output (“I/O”) devices, and more particularly concerns migrating data among such pages.
2. Related Art
According to a trend in computer systems, a system may be reconfigured while running without disrupting data processing. For example, with multiple operating systems running on the computer, a first one of the operating systems may be using a certain block of memory and there may be a need to reallocate the block of memory to use by a second one of the operating systems. Thus the first operating system must first stop using the block of physical memory. Or, for example, a problem may be detected in a block of physical memory, in which case it may be desirable to remove the memory from operation so that it can be replaced. Once again, whatever operating system was using the block of memory must stop using it.
In certain respects it is relatively straightforward to stop using one block of physical memory and start using another, since mechanisms related to virtual memory management already exist in conventional operating systems to handle some aspects of this problem. But the availability of these mechanisms depends on whether the block of memory is being used for program data. If the block of memory is subject to access by I/O devices the problem is more difficult. (This sort of access is commonly direct memory access (“DMA”), although this may not always be the case.) Blocks of memory subject to access by I/O devices are conventionally “pinned,” that is, exempted from being moved because access to them is maintained by essentially endless I/O programs that run as long as the operating system runs. It is disruptive to the system to stop such an I/O program.
Another approach that is not particularly workable would be to invalidate an I/O address translation entry for a block of memory (also referred to as a “page”) to be migrated. Then, if an I/O device were to attempt to access the page, the invalid translation entry would cause an I/O page fault to be reported and the I/O device driver would have to respond. That is the driver would restart the I/O operation after the page became available again. In order for this to work, however, the device drivers of all I/O devices that could possibly have access to the page would have to implement I/O page fault recovery code, which is not a practical solution.
From this brief background it should be appreciated that a need exists for a practical way to migrate data from blocks memory that are subject to access by I/O devices.